/** 
 * created by: Sam Olmsted 
 * last updated: 5-1-2012
 * 
 * Holds the state of the game.
 */
#include "board.h"

int moveCount; 

/** 
 * Holds the boards to print out to the screen. There is another
 * "position" in board -- however this is lowercase and "Position"
 * uppercase is the linked list of boards. 
 */
typedef struct{ 
  board * board; 
  Position * next;  
  Position * prev;  
} Position;

/**
 * Takes a position and returns the next position.
 *[if position!=last position->
 *     stdout:=stdout + position->next->board
 *     return position->next
 * else->
 *     stdout:=stdout + statment that there is no next move
 *     return position]
 */
Position * nextPosition(Position * position); 

/**
 *[if position!=first Position->
 *     stdout:=stdout+position->board
 *     return position->prev
 * else->
 *     stdout:=stdout + statement that there is no previous move
 *     return position]
 */
Position * prevPosition(Position * position); 

/** 
 * Adds the next position to the current position. 
 * [tail's next position = next
 *  next's prev position = tail] 
 **/
void addPosition(Position * tail, Position * next);

/**
 * Creates a position that has itself as next and prev
 */
Position * createPosition(Board * board);
